local skel = fk.CreateSkill {
  name = "emo__xianzhen",
  tags = {Skill.Compulsory},
}

Fk:loadTranslationTable{
  ["emo__xianzhen"] = "陷阵",
  [":emo__xianzhen"] = "锁定技，你的【酒】和【闪】视为【杀】，判定阶段和弃牌阶段改为出牌阶段。",

  ["$emo__xianzhen1"] = "贬酒阙色，所以无污。",
  ["$emo__xianzhen2"] = "避嫌远疑，所以无误。",
}

skel:addEffect(fk.EventPhaseChanging, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(skel.name)  then
      return data.phase == Player.Judge or data.phase == Player.Discard
    end
  end,
  on_use = function(self, event, target, player, data)
    player.room:sendLog{
      type = "#PhaseChanged",
      from = player.id,
      arg = Util.PhaseStrMapper(data.phase),
      arg2 = "phase_play",
    }
    data.phase = Player.Play
  end,
})

skel:addEffect("filter", {
  anim_type = "offensive",
  card_filter = function(self, card, player)
    return player:hasSkill(skel.name) and (card.trueName == "analeptic" or card.trueName == "jink") and
      table.contains(player:getCardIds("h"), card.id)
  end,
  view_as = function(self, player, card)
    local c = Fk:cloneCard("slash", card.suit, card.number)
    c.skillName = skel.name
    return c
  end,
})


return skel
